
<script type="text/javascript" src="__PUBLIC__/Js/jgsat.js"></script>

      <form id="myform" action="<if condition="$action_name=='add'">{:U('User/insert')}<else />{:U('User/update')}</if>" method="post">
      	<table cellpadding=0 cellspacing=0 class="table_form" width="100%">
      	<tr>
		<td width="120">{:L('username')}</td>
		<td><if condition="$action_name=='add'"> <input type="text" class="input-text"  name="username" validate="required:true,en_num:true, minlength:5, maxlength:20"/><else />{$vo['username']}</if></td>
		</tr>
		<tr style="display:none">
		<td>{:L('password')}</td><td><input type="password" id="pwd" name="pwd" class="input-text"  /></td>
		</tr>
		<tr>
			<td>{:L('realname')}</td>
			<td><input type="text" class="input-text"  name="realname" value="{$vo.realname}" ></td>
		</tr>
		<tr>
			<td>{:L('email')}</td>
			<td><input type="text" class="input-text"  name="email" value="{$vo.email}" validate="required:true, minlength:1, maxlength:40"></td>
		</tr>
		<tr>
		<td>{:L('user_is_enable')}</td>
		<td>
		{:L('yes')}<input type="radio" name="status" value="1" <eq name="vo['status']" value="1">checked="checked"</eq> />
		{:L('no')}<input type="radio" name="status" value="0" <eq name="vo['status']" value="0">checked="checked"</eq> />
		</td>
		</tr>
		<tr>
		<td valign="top">{:L('user_group')}</td>
		<td>
		<select name="groupid">
		<volist name="rlist" id="row">
			<option value="{$row['id']}" <eq name="vo['groupid']" value="$row['id']">selected="selected"</eq>>{$row['name']}</option>
		</volist>
		</select>
		</td>
		</tr>
		<tr>
			<td>所在地区</td>
			<td>
                     <select  class="wz_r2" name="province" id="province" onchange="area_change(this.value, 1,'province','city','area');" class="selt mr5" >
                       <option value="0">省份</option>
                     </select>
                     <select class="wz_r2" name="city" onchange="area_change(this.value, 2,'province','city','area');" id="city" class="selt mr5" >
                         <option value="0">城市</option>
                     </select>
                     
                       <script>area_change(0, 0,'province','city','area',{if $vo[province]!=0}{$vo[province]}{else}0{/if},{if $vo[city]!=0}{$vo[city]}{else}0{/if},{if $vo[area]!=0}{$vo[area]}{else}0{/if}); </script>
                       
            </td>
		</tr>
		<tr>
			<td>{:L('sex')}</td>
			<td><input type="radio" id="" name="sex" value=1 <eq name='vo.sex' value='1'>checked </eq> /> {:L('sex1')}&nbsp;<input type="radio" id="" name="sex" value=2 <eq name='vo.sex' value='2'>checked </eq> /> {:L('sex2')} &nbsp;<input type="radio" id="" name="sex" value=1 <eq name='vo.sex' value='0'>checked </eq> />{:L('sex0')}</td>
		</tr>
		<tr>
			<td>{:L('telephone')}</td>
			<td><input type="text" class="input-text"  name="tel" value="{$vo.tel}"></td>
		</tr>
		<tr>
			<td>{:L('mobile')}</td>
			<td><input type="text" class="input-text"  name="mobile" value="{$vo.mobile}"></td>
		</tr>
		<tr>
			<td>{:L('fax')}</td>
			<td><input type="text" class="input-text"  name="fax" value="{$vo.fax}"></td>
		</tr>
		<?php if($vo['groupid']==1){ ?>
		<tr>
			<td>擅长空间</td>
			<td><?php $itemType=explode(",",$vo['itemType']); ?>
                      <YP:list name="Label" where="genre=17" id="r" limit="50">
                      <?php echo in_array($r['id'],$itemType) ? $r['title'].' | ' : '';?>
                      </YP:list></td>
		</tr>
		<tr>
			<td>毕业院校</td>
			<td>{$vo.school}</td>
		</tr>
        <tr>
			<td>证书奖励</td>
			<td>{$vo.reward}</td>
		</tr>
		<tr>
			<td>收费标准</td>
			<td><YP:list name="Type" order="typeid" where="keyid=34" id="val" limit="50">
                            <?php echo $vo['charge'] == $val['typeid'] ? $val['name'] : ''; ?>
                        </YP:list>/元m²</td>
		</tr>
        
		<tr>
			<td>自我评价</td>
			<td>{$vo['my_introduce']}</td>
		</tr>
		
		<?php } ?>
		</table>

		<div class="btn">
		<if condition="$action_name=='edit'"><input type="hidden" name="id" value="{$vo['id']}" />
		<input type="hidden" name="opwd" value="{$vo['password']}" /></if>
		<input type="hidden" name="forward" value="{$_SERVER['HTTP_REFERER']}" />
		<INPUT TYPE="submit"  value="{:L('dosubmit')}" class="button" >
		<input TYPE="reset"  value="{:L('cancel')}" class="button">
		</div>

      </form>
     </div>                                                                                                                                                                                                                                                                                                                                                                                                                                                